package www.dashu.com.auth.exception;

import www.dashu.com.api.CommonResult;
//import org.springframework.security.oauth2.common.exceptions.OAuth2Exception;
import org.springframework.web.bind.annotation.ControllerAdvice;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.ResponseBody;

@ControllerAdvice
public class Oauth2ExceptionHandler {
    @ResponseBody
    @ExceptionHandler(value = Exception.class)
    public CommonResult handleOauth2(Exception e) {
        return CommonResult.failed(e.getMessage());
    }
}
